package com.yi.apipassenger.remote;

import com.yi.internalcommon.dto.ResponseResult;
import com.yi.internalcommon.request.OrderRequest;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.*;

@FeignClient("service-order")
public interface ServiceOrderClient {

    @PostMapping("/order/add")
    ResponseResult add(@RequestBody OrderRequest orderRequest);

    /**
     * 测试派单逻辑
     * @param orderId
     * @return
     */
    @GetMapping("/test-real-time-order/{orderId}")
    String dispatchRealTimeOrderTest(@PathVariable("orderId") long orderId);

    /**
     * 乘客订单取消
     * @param orderId
     * @param identity
     * @return
     */
    @PostMapping("/order/cancel")
    public ResponseResult cancel(@RequestParam("orderId") Long orderId,@RequestParam("identity") String identity);
}
